package com.llynic.designdemo.Observermode;

import java.util.Observable;

public class App {
    public static void main(String[] args) {
        //自己去继承父类实现具体的逻辑
        //主题对象
        Subject subject = new Subject();
        subject.addObserver(new ObserverA());
        subject.addObserver(new ObserverB());
        subject.notifyObservers("change1");
        subject.notifyObservers("change2");
    }

}
